/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package core;

import java.io.File;
import java.io.Serializable;

public class XmlChecker implements Serializable {

    private String realPath = "";
    private String webPath = "";
    private boolean validFile = false;

    public XmlChecker() {
    }

    /**
     * @return the realPath
     */
    public String getRealPath() {
        return realPath;
    }

    /**
     * @param realPath the realPath to set
     */
    public void setRealPath(String realPath) {
        this.realPath = realPath;
    }

    /**
     * @return the webPath
     */
    public String getWebPath() {
        return webPath;
    }

    /**
     * @param webPath the webPath to set
     */
    public void setWebPath(String webPath) {
        this.webPath = webPath;
    }

    /**
     * @return the validFile
     */
    public boolean isValidFile() {

        File f = new File(realPath + webPath);
        if (f.exists()) {
            validFile = true;
        } else {
            validFile = false;
        }

        return validFile;
    }

    public static boolean isExistFile(String filepath) {
        File f = new File(filepath);
        return f.exists();
    }
}
